<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 *
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-->

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://{{ groups.masters[0] }}.{{ CLUSTER_DOMAIN }}/hbase</value>
  </property>
  <property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
  </property>
  <property>
    <name>hbase.zookeeper.quorum</name>
    <value>{% for host in groups.zookeepers %}{{ host }}.{{ CLUSTER_DOMAIN }}{% if not loop.last %},{% endif %}{% endfor %}</value>
  </property>
  <property>
    <name>hbase.tmp.dir</name>
    <value>{{ HBASE_TEMP_DIR }}/hbase-${user.name}</value>
  </property>
  <property>
    <name>OFF-hbase.hlog.split.skip.errors</name>
    <value>true</value>
  </property>
  <property>
    <name>OFF-hbase.master.ui.fragmentation.enabled</name>
    <value>true</value>
  </property>
  <property>
    <name>hbase.bucketcache.combinedcache.enabled</name>
    <value>true</value>
  </property>
  <property>
    <name>hbase.bucketcache.ioengine</name>
    <value>offheap</value>
  </property>
  <property>
    <name>hfile.block.cache.size</name>
    <value>0.2</value>
  </property>
  <property>
    <name>hbase.bucketcache.size</name>
    <value>1024</value>
  </property>
  <!-- Phoenix related settings-->
  <property>
    <name>phoenix.schema.isNamespaceMappingEnabled</name>
    <value>true</value>
  </property>
  {% if SECURITY_ENABLED %}
  <property>
    <name>hbase.regionserver.kerberos.principal</name>
    <value>hbase/_HOST@{{ KRB_REALM }}</value>
  </property>
  <property>
    <name>hbase.regionserver.keytab.file</name>
    <value>{{ KEYTAB_DIR }}/hbase.keytab</value>
  </property>
  <property>
    <name>hbase.master.kerberos.principal</name>
    <value>hbase/_HOST@{{ KRB_REALM }}</value>
  </property>
  <property>
    <name>hbase.master.keytab.file</name>
    <value>{{ KEYTAB_DIR }}/hbase.keytab</value>
  </property>
  <property>
    <name>hbase.security.authentication</name>
    <value>kerberos</value>
  </property>
  <property>
    <!-- enables HDFS client authz -->
    <name>hadoop.security.authentication</name>
    <value>kerberos</value>
  </property>
  <property>
    <!-- enables HBase ACLs -->
    <name>hbase.security.authorization</name>
    <value>true</value>
  </property>
  <property>
    <name>hbase.coprocessor.region.classes</name>
    <value>org.apache.hadoop.hbase.security.token.TokenProvider</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.authProvider.1</name>
    <value>org.apache.zookeeper.server.auth.SASLAuthenticationProvider</value>
  </property>
  <property>
    <!-- enables service-level-authentication on RPC layer -->
    <name>hadoop.security.authorization</name>
    <value>false</value>
  </property>
  <property>
    <!-- enables SSL for the web based UIs -->
    <name>hbase.ssl.enabled</name>
    <value>true</value>
  </property>
  {% endif %}
</configuration>
